<!--
 * @Author: your name
 * @Date: 2020-02-25 13:32:39
 * @LastEditTime: 2020-03-23 14:14:47
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \福路德扫码系统\html\cksm.html
 -->
<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0,viewport-fit=cover" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../../css/vant.css">
    <link rel="stylesheet" type="text/css" href="../../css/base.css" />
    <link rel="stylesheet" type="text/css" href="../../css/local.css" />
    <script type="text/javascript" src="../../script/jquery.js"></script>
    <script type="text/javascript" src="../../script/layer/mobile/layer.js"></script>
    <script type="text/javascript" src="../../script/vue.min.js"></script>
    <script type="text/javascript" src="../../script/vant.min.js"></script>
    <script type="text/javascript" src="../../script/fastclick.js"></script>
    <script type="text/javascript" src="../../script/base.js"></script>
    <script type="text/javascript" src="../../script/scanTransf.js"></script>
    <style>
        .top {
            background-image: url('../../image/bg.png');
            background-size: 100% 100%;
        }

        /* 顶部navBar 透明 */
        .navBar {
            padding: 30px 0px 0px 0px;
            background-color: rgba(108, 167, 219, 0);
        }

        /* 原生修改 */
        .van-nav-bar__title {
            color: #FFFFFF;
        }

        /* navbar 底线 */
        .van-hairline--bottom::after {
            border: none !important;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <div class="box">
            <div class="top">
                <van-nav-bar-main :title="title" left-arrow @click-left="onClickLeft">
                    <div slot="right">
                        <span @click="tranPage">
                            <van-icon name="revoke" size="18px"></van-icon>
                        </span>
                    </div>
                </van-nav-bar-main>
            </div>
        </div>



    </div>
</body>
<script type="text/javascript">
    var vm;
    apiready = function () {
        var browser = api.require('webBrowser');
        vm = new Vue({
            el: '#app',
            data: {
                title: api.pageParam.title,
                tranPageText: 'portrait_up'
            },
            created: function () {
                browser.openView({
                    url: api.pageParam.url,
                    rect: {
                        x: 0,
                        y: 70
                    }
                })
            },
            methods: {
                tranPage: function () {
                    var that = this;
                    if (that.tranPageText == 'landscape_left') {
                        that.tableHeight = window.innerWidth * 1.25 - 100;
                        that.tableWidth = window.innerHeight * 1.25;

                        that.tranPageText = 'portrait_up'
                    } else if (that.tranPageText == 'portrait_up') {
                        that.tableHeight = window.innerWidth * 1.25 - 100;
                        that.tableWidth = window.innerHeight * 1.25;
                        that.tranPageText = 'landscape_left'
                    }
                    api.setScreenOrientation({
                        orientation: that.tranPageText
                    });
                },
                onClickLeft() {
                    api.setScreenOrientation({
                        orientation: 'portrait_up'
                    })
                    api.closeWin();
                }
            }
        })
    };
</script>

</html>